using System;
using System.Collections.Generic;
using System.Text;

namespace YahooStocks
{
   public class Constants
    {
       public static readonly string SymbolSQLTemplate =  "CREATE TABLE [Data](Symbol VARCHAR(50) NOT NULL,Date DATETIME NOT NULL PRIMARY KEY,Open FLOAT,High FLOAT NOT NULL, Low FLOAT NOT NULL, Close FLOAT NOT NULL, Volume INTEGER)";
       public static string NewSymbolSQLTemplate = "REPLACE INTO MASTER (SYMBOL,FIRSTDATE,LASTDATE) VALUES (@Symbol, @FirstDate, @LastDate)";
       public static string UpdateSymbolSQLTemplate = "UPDATE [TABLE] SET  OPEN=@Open, High =@High, Low=@Low,Close=@Close, Volume=@Volume WHERE DATE = @DATE";
       public static string InsertSymbolSQLTemplate = "REPLACE INTO [SYMBOL] (SYMBOL,DATE,OPEN,HIGH,LOW,CLOSE,VOLUME) VALUES(@Symbol,@Date,@Open,@High,@Low,@Close,@Volume)";
       public static string GetAllSymbolsSQLTemplate = "SELECT * FROM MASTER WHERE SYMBOL=@Symbol";
       public static string GetIssueDataSQLTemplate = "SELECT * FROM [SYMBOL] WHERE DATE >=@firstDate AND DATE <=@lastDate";
       public static readonly string ConnectionString = "Data Source="+ System.Environment.CurrentDirectory + @"\Stocks.db3;Version=3";
   }
}
